package com.springmvc.demo.model;

import java.util.Date;



public class RegistryFormOfNcms {
	/*
	 * 参合登记表
	 */
	private int id;
	private String name,sex,address,phone;
	private int age;
	private Date registry_date;		//参合时间
	private String regInvoice; //参合发票号
	private String registryNo; //参合证号
	private String idCard;
	
	public String getIdCard() {
		return idCard;
	}
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	public String getRegInvoice() {
		return regInvoice;
	}
	public void setRegInvoice(String regInvoice) {
		this.regInvoice = regInvoice;
	}
	public String getRegistryNo() {
		return registryNo;
	}
	public void setRegistryNo(String registryNo) {
		this.registryNo = registryNo;
	}


	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}

	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public Date getRegistry_date() {
		return registry_date;
	}
	public void setRegistry_date(Date registry_date) {
		this.registry_date = registry_date;
	}


	/*
	public boolean getReg(int i,int year) {
		//TODO
		boolean flag=false;
		JdbcUtils jdbcUtils=new JdbcUtils();
		Connection conn=jdbcUtils.getConn();
		PreparedStatement pstmt = null;
		ResultSet rs=null;
		System.out.println(year);
		try {
			String sql="SELECT * FROM registry_form_of_ncms WHERE id=? and year=?";
			pstmt=conn.prepareStatement(sql);
			pstmt.setInt(1, i);
			pstmt.setInt(2, year);
			rs=pstmt.executeQuery();
			if(rs.next()) {
				flag=true;
			}
		}catch(SQLException e) {
			e.printStackTrace();
		}
		
		return flag;
	}
	/*
	public static void main(String[] args) {
		if(new RegistryFormOfNCMS().getReg(1,2018)) {
			System.out.println("qqqqqqqqqqqqqq");
		}else {
			System.out.println("ffffffffffffffff");
		}
	}
	*/
}
